// src/api/mock.ts
import Mock from 'mockjs';
import houseApi from './mockData/house.ts';
import appointmentApi from './mockData/appointment.ts';
import request from "../utils/request";
import userApi from './mockData/user.ts';

// 拦截请求
Mock.mock('/house/getData', houseApi.getHouseData());
Mock.mock('/appointment/getData', appointmentApi.getAppointmentData());

export const getHouseData = () => request.get('/house/getData');
export const getAppointmentData = () => request.get('/appointment/getData');

Mock.mock('/api/auth/userInfo', 'get', userApi.getUserInfo());
Mock.mock('/api/user/login', 'get', userApi.userLogin());
export const userLogin = () => request.get('/api/user/login');